package com.gf.forcesystem.mq.weatherparse;

import com.gf.forcesystem.model.dto.weather.AbstractWeather;
import com.gf.forcesystem.model.dto.weather.SandDust;
import org.springframework.stereotype.Service;

import java.nio.ByteBuffer;

/**
 * @author gaofei
 * @date 2022/6/24 21:33
 */
@Service("SandDustParse")
public class SandDustParse implements IWeatherParse{
    @Override
    public byte identifier() {
        return (byte) 0xC6;
    }

    @Override
    public AbstractWeather parse(ByteBuffer byteBuffer) {
        SandDust sandDust = new SandDust();
        sandDust.setType(byteBuffer.get());
        return sandDust;
    }
}
